package br.com.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.com.bean.ClienteBean;
import br.com.connection.ConnectionFactory;
import br.com.controller.ControllerCliente;
import br.com.view.ClienteView;
import br.com.view.FabricaHtml;
import br.com.view.HtmlPadroes;
import br.com.view.ResponsavelView;

/**
 * Servlet implementation class ResponsavelServlet
 */
public class ClienteServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public ClienteServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doExecute(request, response);
	}
	protected void doExecute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		PrintWriter out = response.getWriter();
		StringBuilder sb = new StringBuilder();
		String typy="Cliente";
		CadWindows c = new CadWindows();
		ClienteView cli = new ClienteView();

		try {
			
			
			out.print(cli.cliente());
			c.doExecute(request, response);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
//		try{
		//		} catch (Exception e) {
		//// TODO Auto-generated catch block
		//e.printStackTrace();
		//}	
		//}
		/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doExecute(request, response);
	}

}
